package com.rw.coco.util;

import com.rw.coco.api.data.ConfigMapper;
import com.rw.tool.util.properties.PropertiesReader;

import java.util.Properties;

/**
 * 默认配置文件
 */
public class DefaultConfigMapper implements ConfigMapper {
    // COC别名路径
    private static final String ANOTHER_NAME_PATH = "com/rw/coco/base/anotherName.properties";
    // 指令配置路径
    private static final String COMMAND_PATH = "com/rw/coco/base/command.properties";
    // 详情配置路径
    private static final String OPTION_PATH = "com/rw/coco/base/option.properties";

    /**
     * 获得COC别名配置
     *
     * @return COC别名配置文件
     */
    @Override
    public Properties getAnotherName() {
        return PropertiesReader.load(ANOTHER_NAME_PATH).getProperties();
    }

    /**
     * 获得指令配置
     *
     * @return 指令配置文件
     */
    @Override
    public Properties getCommand() {
        return PropertiesReader.load(COMMAND_PATH).getProperties();
    }

    /**
     * 获得详情选项
     *
     * @return 详情选项文件
     */
    @Override
    public Properties getOption() {
        return PropertiesReader.load(OPTION_PATH).getProperties();
    }
}
